Closed Bug 1586454 Opened 6 years ago Closed 5 years ago

Setting innerHTML doesn't trigger DOM breakpoint and removes it

Categories

(DevTools :: Debugger, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sebo, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Attached file testcase.html

What were you doing?

  1. Open the Inspector on the attached test case
  2. Right-click <div id="x"> and choose Break on... > Subtree Modification from the context menu
  3. Click the "Modify innerHTML" button within the page

What happened?

Execution is not stopped and the breakpoint is removed.

What should have happened?

The script execution should halt at line 21 and the DOM breakpoint should not be removed.

Anything else we should know?

Interestingly, it works as expected when you repeat steps 2 and 3. It also works if you set innerHTML of a child element.

Attached file remove_text_node.html

I just realized that this also happens when a text node is removed from the subtree. I've attached a second test case for that. The steps are the same, set a subtree modification breakpoint then click the button.

I didn't create another bug report for that one, because I assume they are caused by the same bug. If it turns out that they are unrelated, I will create a separate bug.

Sebastian

Priority: -- → P2

This seems to work for me on Nightly, are you still able to reproduce?

Flags: needinfo?(sebastianzartner)

Hi Logan! Sorry for the late reply! Yes, both test cases work for me now. mozregression tells me this got fixed in bug 1616984.

Thank you!

Sebastian

Status: NEW → RESOLVED
Closed: 5 years ago
Flags: needinfo?(sebastianzartner)
Resolution: --- → FIXED
Summary: Setting innerHTML doesn't trigger DOM breakoint and removes it → Setting innerHTML doesn't trigger DOM breakpoint and removes it
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: